package com.example.jedis.client.protocol.response;

import com.example.jedis.client.protocol.constant.RedisProtocolConstant;
import com.example.jedis.client.transport.RedisTransport;

import java.nio.ByteBuffer;

/**
 * 状态返回
 * 一个状态回复（或者单行回复，single line reply）是一段以 "+" 开始、 "\r\n" 结尾的单行字符串。
 */
public class ApplyStatus extends  AbstractApplyProtocol implements ApplyProtocol {

    @Override
    public byte getFlag() {
        return RedisProtocolConstant.APPLY_STATE;
    }


    @Override
    public String fromBytes(RedisTransport redisTransport, ByteBuffer byteBuffer){
        return this.readFirstSegmentToString(redisTransport,byteBuffer);
    }



}
